You Cannot Return a Value Because this Method has No Defined Return Type Error
You can't use the Return statement with a variable, expression, or value to be returned in a method unless you define a data type for the value being returned in the function declaration.
Example
No return data type defined in the method declaration:
To return a value, declare the data type of the returned value. In that case, the declaration statement in this example would be:
See Also